package aame.dao;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;


public class SQLiteHelper extends SQLiteOpenHelper {
	
	public static final String DATABASE_NAME = "teste600";
	private static final int DATABASE_VERSION = 1;    
	
	public SQLiteHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}
	
	public void onCreate(SQLiteDatabase db) {	
		db.execSQL(new EnderecoDao().CRIAR_TB_ENDERECO);	
		db.execSQL(new ClienteDao().CRIAR_TB_CLIENTE);			
	}
	
	public void onUpgrade(SQLiteDatabase db, int arg1, int arg2) {
		db.execSQL(new ClienteDao().DROP_TB_CLIENTE);
		onCreate(db);
	}	
	
	public synchronized void close() {
		super.close();
	}
}


	